home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d13
/
nm091.arc
/
EXAMPLE.BAT
< prev
next >
Wrap
DOS Batch File
|
1991-05-29
|
1KB
|
32 lines
@echo off
rem ---- Turns of the echoing of Commands to the console
:TOP
rem ---- A marker so we can loop back to this point later
NM /B!!TEMP!! /F*.* /CDIR /2/W /TTesting_the_Now_Menu_Program! /@
rem ---- Call the NM program, create a batch file called $$TEMP$$, display
rem ---- a menu of all files, use the DIR command with the parameter /W
rem ---- for wide display after the file spec and give it a little title
rem ---- Also, the /@ parameter disable reading of the config file.
if exist !!temp!!.bat goto RUN
rem ---- if a file was created by NM then jump to the RUN marker to
rem ---- execute the batch file we created
goto EXIT
rem ---- If no file was created then we are ready to quit, so go to the
rem ---- exit marker
:RUN
rem ---- Another marker, this time for running our created batch file
call !!TEMP!!
rem ---- CALL the batch file (using the call command ensures that control
rem ---- will return to this batch file after $$TEMP$$ executes
pause
rem ---- Wait until user sees result to continue on
erase !!temp!!.bat
rem ---- we are done with our batch file, so lets erase it
cls
rem ---- CLear the Screen
goto TOP
rem ---- Jump back to the top to run the menu system again
:EXIT
rem ---- Another marker, this time for the spot to exit this batch file
CLS
rem ---- CLear the Screen